import request from "@/utils/request";

// 查询拥有商保应用的租户
export function selectSiteWithInsurance(params) {
  return request({
    url: `/insurance/api/v1/companies/selectSiteWithInsurance`,
    method: "get",
    params
  });
}

export function selectCompanyBySiteId(siteId) {
  return request({
    url: `/insurance/api/v1/companies/selectCompanyBySiteId/${siteId}`,
    method: "get"
  });
}

export function updateCompanyBySiteId(data) {
  return request({
    url: `/insurance/api/v1/companies`,
    method: "put",
    data
  });
}
export function addPlan(data) {
  return request({
    url: `/insurance/api/v1/companySchemes`,
    method: "post",
    data
  });
}
export function editPlan(data) {
  return request({
    url: `/insurance/api/v1/companySchemes`,
    method: "put",
    data
  });
}
export function getPlan(params) {
  return request({
    url: `/insurance/api/v1/companySchemes`,
    method: "get",
    params
  });
}
export function deletePlan(companySchemeId) {
  return request({
    url: `/insurance/api/v1/companySchemes/${companySchemeId}`,
    method: "delete"
  });
}
